// Copyright (C) 2010  Joan Puigcerver Perez, <joapuipe@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//

#ifndef __MAPNODE_HPP__
#define __MAPNODE_HPP__

#include <list>

#include <Node.hpp>

/**
 * \class MapNode
 *  
 * Class that stores the mapped values in a Map (both movies and people maps).
 *
 * The map key is a string which maps a set of Nodes (i.e: movies or persons). Each key
 * can refers only to one Node as its ID, but it can refers to several Nodes as an aka
 * name or title.
 *
 */
class MapNode {
public:
  /** The node which the key value of the map is identifying. */
  Node * main;
  /** The list of nodes that uses the key value as an aka name. */
  std::list<Node*> akas;
  
  /**
   * Empty constructor.
   */
  MapNode();

  //MapNode& operator = (const MapNode& other);
  
  /**
   * This function returns true if the key value is an identifier of any Node.
   */
  bool is_id(void) const;
};


#endif 
